package cn.wolfcode.mq._02_send_type;

import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SendOneController {

    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    @RequestMapping("/sendOneMsg")
    public String sendOneMsg(String msg){
        rocketMQTemplate.sendOneWay("03_oneWay",msg);
        return "success";
    }


}
